//
//  BloodOxygenDetailTitleView.swift
//  DaRings
//
//  Created by 易先生 on 2022/11/2.
//

import UIKit
import MYModule

class BloodOxygenDetailTitleView: View {
    
    override func makeUI() {
        super.makeUI()
        
        self.addSubview(titleLabel)
        titleLabel.snp.makeConstraints { make in
            make.top.equalToSuperview().offset(14)
            make.leading.equalToSuperview().offset(20)
            make.trailing.equalToSuperview().offset(-20)
            make.bottom.equalToSuperview()
        }
    }

    public func bind(to title: String, bgColor: UIColor) {
        titleLabel.text = title
        self.backgroundColor = bgColor
    }

    private lazy var titleLabel: Label = {
        let titleLabel = Label()
        titleLabel.font = Fonts.boldSystemFont(ofSize: 14)
        titleLabel.textColor = UIColor.assist_222222
        return titleLabel
    }()

}
